Skip to content

Conversation

@reason-rock
Copy link

Description

This PR addresses build failures (linker errors) encountered when building Snapmaker OrcaSlicer statically on Linux environments (tested on Ubuntu 22.04).

  • Fixed Boost Log Linker Error: Updated CMakeLists.txt to conditionally define BOOST_LOG_DYN_LINK based on Boost_USE_STATIC_LIBS rather than SLIC3R_STATIC. This ensures that boost::log is correctly linked without expecting dynamic symbols when static libraries are used.
  • Fixed Blosc Undefined References: Updated src/libslic3r/CMakeLists.txt to change Blosc::blosc linking from PRIVATE to PUBLIC. This ensures that Blosc symbols (required by OpenVDB) are properly propagated to the executable, resolving undefined reference errors like blosc_compress_ctx.

These changes enable successful compilation with -DSLIC3R_STATIC=ON, improving build compatibility for Linux distributions like Ubuntu 22.04.

Screenshots/Recordings/Graphs

N/A (Build system configuration fix)

Tests

I have verified these changes by building the project on Ubuntu 22.04 LTS:

  1. Configuration:
    cmake -S . -B build -G Ninja \
      -DCMAKE_BUILD_TYPE=Release \
      -DSLIC3R_STATIC=ON \
      -DOPENVDB_USE_STATIC_LIBS=ON
  2. Build: cmake --build build completed successfully without linker errors.
  3. Execution: The generated binary and AppImage launch correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant